package cn.sirun.com.fca.personal.center.block.item.impl;

import com.tencent.cloud.iov.util.ObjectUtils;

import cn.sirun.com.fca.personal.center.block.item.ITextBlockItem;

/**
 * 文本区块数据
 *
 * @author showxiao
 * @date 2018/3/28
 */
public class TextBlockItem implements ITextBlockItem {

    private String mText;

    public TextBlockItem(String text) {
        mText = text;
    }

    @Override
    public String getText() {
        return mText;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        TextBlockItem that = (TextBlockItem) o;
        return ObjectUtils.equals(mText, that.mText);
    }

    @Override
    public int hashCode() {
        return ObjectUtils.hash(mText);
    }
}
